<?php

namespace Reportes\Controller;

use Reportes\Controller\GenericController;
use Componentes\Controller\UtilsArrayController;

class PlanillaController extends GenericController {

    public function __construct() {
        
    }

    public function get($id) {
        /*
         * Datos del datosAcademicos COMPLETO (con el grupo)
         * Ej: http://localhost/UptaebBackend/public/reportes/planilla/07443224
         * Rsp: {}
         */
        $cedula = $this->params()->fromRoute('id');
        $this->getPlanillaService()->getPlanilla($cedula);
        //return $this->convertirArrayAJson($output);
    }

    /**
     * Return list of resources
     * @return mixed
     */
    public function getList($id = 1, $param1 = 1, $param2 = 1, $param3 = 1) {
        $id = $this->params()->fromRoute('id');
        $param1 = $this->params()->fromRoute('param1');
        $data = null;
        $mensaje = "Defaul";
        switch ($id) {
            case (0):
                /*
                 * Planilla de inscripcion
                 * Ej: http://localhost/UptaebBackend/public/reportes/planilla/0/07443224
                 */
                $cedula = $this->params()->fromRoute('param1');
                $this->getPlanillaService()->getPlanilla($cedula);
                break;
            default:
                return $param1;
        }
        //return $this->convertirArrayAJson($output);
    }
}
